const connection = require('../database/dataBase')

class ArticleService {
  async getArticleDetail(artId) {
    const sql = 'SELECT * FROM homearticles WHERE `id` = ?;'
    const result = await connection.execute(sql, [artId])
    return result[0]
  }
}

module.exports = new ArticleService()